package cn.cque.service.impl;

import cn.cque.entity.Cart;
import cn.cque.entity.CartItem;
import cn.cque.service.CartService;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: XWC
 * @ClassName: CartServiceImpl
 * @Date: 2020/10/5
 * @Time: 14:08
 * @Description:
 */
@Service
public class CartServiceImpl implements CartService {
    //将购物项加入购物车
    @Override
    public Cart addItem(Cart cart, CartItem cartItem){
        cart.addCartItem(cartItem);
        return cart;
    }
}